package com.kingyun.gpsinspection.purificationservice.facade.service.iam.adm;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.BootstrapSearchBean;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.AutoApply;
import com.kingyun.gpsinspection.purificationservice.facade.model.iam.adm.TaskLinkIam;


public interface OutAutoApplyService
{
    /**
     * 删除
     * @param autoApplyId
     * @return
     */
    int deleteByPrimaryKey(String autoApplyId);

    /**
     * 新增并开启流程
     * @param record
     * @param username
     * @param password
     * @return
     */
    int insertSelective(AutoApply record, String username, String password);

    /**
     * 查询
     * @param autoApplyId
     * @return
     */
    AutoApply selectByPrimaryKey(String autoApplyId);

    /**
     * 个人申请列表
     * @param autoApply
     * @return
     */
    JSONObject list(AutoApply autoApply);

    /**
     * 节点处理
     * @param autoApply
     * @param taskLinkIam
     * @param userName
     * @param pwd
     * @return
     */
    int dispose(AutoApply autoApply, TaskLinkIam taskLinkIam, String userName, String pwd);

    /**
     * 查询代处理
     * @param bootstrapSearchBean 查询单条件
     * @param task
     * @param type 0 休假1出差2用车
     * @return
     * @throws Exception
     */
    JSONObject listToDoTask(BootstrapSearchBean bootstrapSearchBean, TaskLinkIam task, int type, String username, String passwor);
}
